using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Drawing.Drawing2D;

namespace Rigging
{
    public class Skin
    {
        private Region m_region;
        private List<GraphicsPath> m_paths;
        private Pen m_pen;

        public Skin()
        {
            m_paths = new List<GraphicsPath>();
        }

        public void AddRegion(Region reg)
        {
        }

        public void AddPath(GraphicsPath path)
        {
            m_paths.Add(path);
        }

        public void AddArc(Point center, int radius, int start, int sweep)
        {
        }

        public void LoadSample()
        {
            // Create an array of points for the curve in the second figure.
            Point[] points = {
                new Point(40, 60),
                new Point(50, 70),
                new Point(30, 90)
            };

            GraphicsPath path = new GraphicsPath();

            path.StartFigure(); // Start the first figure.
            path.AddArc(175, 50, 50, 50, 0, -180);
            path.AddLine(100, 0, 250, 20);
            // First figure is not closed.

            path.StartFigure(); // Start the second figure.
            path.AddLine(50, 20, 5, 90);
            path.AddCurve(points, 3);
            path.AddLine(50, 150, 150, 180);
            path.CloseFigure(); // Second figure is closed.

            m_paths.Add(path);
            //e.Graphics.DrawPath(new Pen(Color.FromArgb(255, 255, 0, 0), 2), path);
        }

        public void AddBLine()
        {
        }


        public void Repaint(Graphics gr)
        {
            foreach(GraphicsPath pt in m_paths)
                gr.DrawPath(m_pen, pt);
        }
    }


}
